namespace ext
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>A base editor field that handles displaying/hiding on demand and has some built-in sizing and event handling logic.</summary>
	/// <definedin>src\widgets\Editor.js</definedin>
	[ScriptName("Editor")]
	[ScriptNamespace("Ext")]
	[Imported()]
	public partial class Editor : ext.Component
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The config object</param>
		public Editor(ext.Editor_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public Editor()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>The Field object (or descendant) or config object for field</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("field")]
		public ext.form.Field Field;
		
		/// <summary>
		/// True to {@link #completeEdit complete the editing process} if in edit mode when the
		/// field is blurred. Defaults to true.
		/// </summary>
		/// <htmlSummary>
		/// True to {@link #completeEdit complete the editing process} if in edit mode when the
		/// field is blurred. Defaults to &lt;tt&gt;true&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("allowBlur")]
		public bool AllowBlur;
		
		/// <summary>
		/// True for the editor to automatically adopt the size of the underlying field, &quot;width&quot; to adopt the width only,
		/// or &quot;height&quot; to adopt the height only, &quot;none&quot; to always use the field dimensions. (defaults to false)
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("autoSize")]
		public ext.auto.System_Boolean_Or_System_String AutoSize;
		
		/// <summary>
		/// True to automatically revert the field value and cancel the edit when the user completes an edit and the field
		/// validation fails (defaults to true)
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("revertInvalid")]
		public bool RevertInvalid;
		
		/// <summary>
		/// True to skip the edit completion process (no save, no events fired) if the user completes an edit and
		/// the value has not changed (defaults to false). Applies only to string values - edits for other data types
		/// will never be ignored.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("ignoreNoChange")]
		public bool IgnoreNoChange;
		
		/// <summary>False to keep the bound element visible while the editor is displayed (defaults to true)</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("hideEl")]
		public bool HideEl;
		
		/// <summary>The data value of the underlying field (defaults to &quot;&quot;)</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("value")]
		public object Value;
		
		/// <summary>The position to align to (see {@link Ext.Element#alignTo} for more details, defaults to &quot;c-c?&quot;).</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("alignment")]
		public string Alignment;
		
		/// <summary>The offsets to use when aligning (see {@link Ext.Element#alignTo} for more details. Defaults to [0, 0].</summary>
		/// <htmlSummary>The offsets to use when aligning (see {@link Ext.Element#alignTo} for more details. Defaults to &lt;tt&gt;[0, 0]&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("offsets")]
		public System.Array Offsets;
		
		/// <summary>
		/// &quot;sides&quot; for sides/bottom only, &quot;frame&quot; for 4-way shadow, and &quot;drop&quot;
		/// for bottom-right shadow (defaults to &quot;frame&quot;)
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("shadow")]
		public ext.auto.System_Boolean_Or_System_String Shadow;
		
		/// <summary>True to constrain the editor to the viewport</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("constrain")]
		public bool Constrain;
		
		/// <summary>Handle the keydown/keypress events so they don&apos;t propagate (defaults to true)</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("swallowKeys")]
		public bool SwallowKeys;
		
		/// <summary>True to complete the edit when the enter key is pressed. Defaults to true.</summary>
		/// <htmlSummary>True to complete the edit when the enter key is pressed. Defaults to &lt;tt&gt;true&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("completeOnEnter")]
		public bool CompleteOnEnter;
		
		/// <summary>True to cancel the edit when the escape key is pressed. Defaults to true.</summary>
		/// <htmlSummary>True to cancel the edit when the escape key is pressed. Defaults to &lt;tt&gt;true&lt;/tt&gt;.</htmlSummary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("cancelOnEsc")]
		public bool CancelOnEsc;
		
		/// <summary>True to update the innerHTML of the bound element when the update completes (defaults to false)</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("updateEl")]
		public bool UpdateEl;
		
		/// <summary>
		/// Fires when editing is initiated, but before the value changes. Editing can be canceled by returning
		/// false from the handler of this event.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("beforestarteditEventName")]
		public const string BeforestarteditEventName = "beforestartedit";
		
		/// <summary>Fires when this editor is displayed</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("starteditEventName")]
		public const string StarteditEventName = "startedit";
		
		/// <summary>
		/// Fires after a change has been made to the field, but before the change is reflected in the underlying
		/// field. Saving the change to the field can be canceled by returning false from the handler of this event.
		/// Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this
		/// event will not fire since no edit actually occurred.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("beforecompleteEventName")]
		public const string BeforecompleteEventName = "beforecomplete";
		
		/// <summary>Fires after editing is complete and any changed value has been written to the underlying field.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("completeEventName")]
		public const string CompleteEventName = "complete";
		
		/// <summary>Fires after editing has been canceled and the editor&apos;s value has been reset.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("canceleditEventName")]
		public const string CanceleditEventName = "canceledit";
		
		/// <summary>
		/// Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check
		/// {@link Ext.EventObject#getKey} to determine which key was pressed.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("specialkeyEventName")]
		public const string SpecialkeyEventName = "specialkey";
		#endregion
		
		#region Methods
		/// <summary>Sets the height and width of this editor.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="width">The new width</param>
		/// <param name="height">The new height</param>
		[ScriptName("setSize")]
		public void SetSize(System.Number width, System.Number height)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Ends the editing process, persists the changed value to the underlying field, and hides the editor.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="remainVisible">Override the default behavior and keep the editor visible after edit (defaults to false)</param>
		[ScriptName("completeEdit")]
		public void CompleteEdit(bool remainVisible)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Cancels the editing process and hides the editor without persisting any changes. The field value will be
		/// reverted to the original starting value.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="remainVisible">
		/// Override the default behavior and keep the editor visible after
		/// cancel (defaults to false)
		/// </param>
		[ScriptName("cancelEdit")]
		public void CancelEdit(bool remainVisible)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Sets the data value of the editor</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="value">Any valid value supported by the underlying field</param>
		[ScriptName("setValue")]
		public void SetValue(object value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Gets the data value of the editor</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <returns>The data value</returns>
		[ScriptName("getValue")]
		public object GetValue()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Starts the editing process and shows the editor.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="el">The element to edit</param>
		/// <param name="value">
		/// A value to initialize the editor with. If a value is not provided, it defaults
		/// to the innerHTML of el.
		/// </param>
		[ScriptName("startEdit")]
		public void StartEdit(object el, string value)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Starts the editing process and shows the editor.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="el">The element to edit</param>
		[ScriptName("startEdit")]
		public void StartEdit(object el)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Realigns the editor to the bound field based on the current alignment config value.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		/// <param name="autoSize">True to size the field to the dimensions of the bound element.</param>
		[ScriptName("realign")]
		public void Realign(bool autoSize)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Realigns the editor to the bound field based on the current alignment config value.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("realign")]
		public void Realign()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>
		/// Fires when editing is initiated, but before the value changes. Editing can be canceled by returning
		/// false from the handler of this event.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("beforestartedit")]
		public event ext.auto.Delegate_ext_Editor_And_ext_Element_And_System_Object Beforestartedit;
		
		/// <summary>Fires when this editor is displayed</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("startedit")]
		public event ext.auto.Delegate_ext_Element_And_System_Object Startedit;
		
		/// <summary>
		/// Fires after a change has been made to the field, but before the change is reflected in the underlying
		/// field. Saving the change to the field can be canceled by returning false from the handler of this event.
		/// Note that if the value has not changed and ignoreNoChange = true, the editing will still end but this
		/// event will not fire since no edit actually occurred.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("beforecomplete")]
		public event ext.auto.Delegate_ext_Editor_And_System_Object_And_System_Object Beforecomplete;
		
		/// <summary>Fires after editing is complete and any changed value has been written to the underlying field.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("complete")]
		public event ext.auto.Delegate_ext_Editor_And_System_Object_And_System_Object Complete;
		
		/// <summary>Fires after editing has been canceled and the editor&apos;s value has been reset.</summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("canceledit")]
		public event ext.auto.Delegate_ext_Editor_And_System_Object_And_System_Object Canceledit;
		
		/// <summary>
		/// Fires when any key related to navigation (arrows, tab, enter, esc, etc.) is pressed. You can check
		/// {@link Ext.EventObject#getKey} to determine which key was pressed.
		/// </summary>
		/// <definedin>src\widgets\Editor.js</definedin>
		[ScriptName("specialkey")]
		public event ext.auto.Delegate_ext_Editor_And_ext_EventObject Specialkey;
		#endregion
	}
}
